package com.itheima.spring_boot_day01;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zero
 * @date 2020年6月10日
 */

@RestController
public class HelloController {



    @Value("${person.name}")
    private String name2;
    @Value("${address1[0]}")
    private String address;
    @Value("${msg1}")
    private String msg1;

    @RequestMapping("/hello2")
    public String hello2(){

        System.out.println(name2);
        System.out.println(address);
        System.out.println(msg1);


       return "hello spring_boot 222";
    }

    @RequestMapping("/hello")
    public String hello(){
        return "hello spring_boot";
    }

}
